import request from '../utils/request'
// 获取部门信息
export function getDepts() {
  return request({
    url: '/company/department',
    method: 'get'
  })
}
// 发送新增部门请求
export function addDepts(data) {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}
// 根据id获取部门详情
export function getDeptsDetail(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'get'
  })
}
// 根据id发送修改请求
export function eidtDepts(data) {
  return request({
    url: `/company/department/${data.id}`,
    method: 'put',
    data
  })
}
// 根据id删除部门请求
export function delDepts(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'delete'

  })
}
